/// @tags: Math
#include <cctype>
#include <cstdio>

typedef long long ll;

int const N = 1e7 + 5;

template <typename T>
inline T &read(T &x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

int n, cnt;
ll pri[N / 10], f[N];
bool vis[N];

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("factor.in", "r", stdin);
  freopen("factor.out", "w", stdout);
#endif
#endif

  read(n);
  for (int i = 2; i <= n; ++i) {
    if (!vis[i]) {
      pri[++cnt] = i;
      f[i] = 1;
    }
    for (int j = 1; j <= cnt && pri[j] * i <= n; ++j) {
      vis[i * pri[j]] = true;
      f[i * pri[j]] = f[i] + 1;
      if (i % pri[j] == 0) break;
    }
  }
  for (int i = 1; i <= n; ++i) f[i] += f[i - 1];
  printf("%lld", f[n]);
  return 0;
}